package com.jindi.jacococli.biz.business.service;

import com.jindi.jacococli.biz.business.domain.DemoUser;
import com.jindi.jacococli.biz.business.domain.DemoUserExample;
import com.jindi.jacococli.biz.business.mapper.DemoUserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Slf4j
@Service
public class DemoUserService {

    @Resource
    private DemoUserMapper demoUserMapper;

    public List<DemoUser> getUserByName(String userName) {
        DemoUserExample demoUserExample = new DemoUserExample();
        demoUserExample.createCriteria().andUsernameEqualTo(userName);
        return demoUserMapper.selectByExample(demoUserExample);
    }

}
